package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.ViewGroup;
import android.view.animation.Animation;

public class FrameActivity extends AppCompatActivity {
    ViewGroup viewGroup;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_frame);
        viewGroup=findViewById(R.id.container);
        viewGroup.setBackgroundResource(R.drawable.frame);
        AnimationDrawable animation= (AnimationDrawable) viewGroup.getBackground();
        animation.start();
    }
}